<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@include file="/WEB-INF/templates/common/taglib.jsp"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
       <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <title>${title }</title>
    <link rel="stylesheet" href="${basePath}/static/bootstrap/css/bootstrap.css"/>
    <link href="${basePath}/static/css/basic.css" rel="stylesheet" type="text/css">
    <link href="${basePath}/static/css/login.css" rel="stylesheet" type="text/css">
    <link href="${basePath}/static/css/list.css" rel="stylesheet" type="text/css">
<%--     <link rel="stylesheet" href="${basePath}/static/css/content_leftNav.css"/>
    <link rel="stylesheet" href="${basePath}/static/css/FrontControl.css"/> --%>
    <script  type="text/javascript" src="${basePath}/static/js/jquery.min.js"></script>
	<script  type="text/javascript" src="${basePath}/static/My97DatePicker/WdatePicker.js"></script>
	<script type="text/javascript" src="${basePath}/static/page/jqPaginator/jqPaginator.js"></script>
    <script  type="text/javascript" src="${basePath}/static/layer/layer.js"></script>
    <link href="${basePath}/static/layer/layer_defined.css" rel="stylesheet" type="text/css">
    
</head>
<body>
<!--头部-->
	<%@include file="/WEB-INF/templates/common/header.jsp"%>
	<!------导航条-->
	<%@include file="/WEB-INF/templates/common/navigation.jsp"%>

<!--内容部分-->
<div class="list_main lay_out" class="clearfix">
    <div class="list_DH">
        <%@include file="/WEB-INF/templates/common/inhospitalDisease.jsp"%>
    </div>
    <div class="list_NR">
        <div class="loc">
            <h3 style="margin:0">生成日报</h3>
        </div>
        <div class="list_con_table">
            <div class="search_table">
                <ul class="clearfix" style="margin-bottom:0;">
                	<li class="Label_1" style="width:12%;">出院日期：&nbsp;</li>
                    <li class="Label_4" style="text-align:left;padding-left:3px;width:32%">
                    	<input class="Wdate input" style="width:44%;" type="text"  name='startTime' id='outHospitalStartTime' value='' onFocus="WdatePicker()" />
                    	<span>&nbsp;-&nbsp;</span><input class="Wdate input" type="text" style="width:44%;"  name='endTime' id='outHospitalEndTime' value='' onFocus="WdatePicker()" />
                    </li>
                   <!-- 	<li class="Label_1" style="width:12%;">科室名称：&nbsp;</li>
   					<li class="Label_2" style="width:15%;">
	   					<select class="input_box"><option>101011-呼吸内科病房</option></select>
	   				</li> -->
                    <li class="Label_5">
                        <div class="right" style="text-align:right">
                            <a onclick="queryQua()">查询</a>
                             &nbsp;<a onclick="exportExcel()">导出</a>
                         	
                        </div>
                    </li>
                  
                </ul>
            </div> 
             <table class="Search_tableList" cellpadding="0" cellspacing="0">
             
              <tr>
                    <td class="tdLabel_4" colspan="14" style="font-size:18px;font-weight:700">病房工作量动态日报表</td>
              </tr>
              <tr>
                  
                    <td class="tdLabel_4" >科室名称</td>
           			<td class="tdLabel_4" >入院病人数</td>
                    <td class="tdLabel_4"> 出院病人数</td>
                    <td class="tdLabel_4"> 病危病人数</td>
                    <td class="tdLabel_4"> 抢救人数</td>
                    <td class="tdLabel_4"> 抢救成功人数</td>
                    <td class="tdLabel_4">病重病人数</td>
                    <td class="tdLabel_4">特级护理人数</td>          
                </tr>
                
                <tbody id="tbody">
                </tbody>
                  
            </table>
        </div>
    </div>
</div>
<!------页脚部分--------->
<%@include file="/WEB-INF/templates/common/footer.jsp"%>

<!--JS部分-->
<script type="text/javascript">


	function exportExcel(){
		var outHospitalStartTime=$("#outHospitalStartTime").val();
		var outHospitalEndTime=$("#outHospitalEndTime").val();
		if((outHospitalStartTime==null || outHospitalStartTime=="") && (outHospitalEndTime==null || outHospitalEndTime=='') ){
			layer.alert("请输入查询条件!",{icon:7});
			return;
		}
		
		window.location.href="${basePath}/retrieval/exportOfficeWork?outHospitalStartTime="+outHospitalStartTime+"&outHospitalEndTime="+outHospitalEndTime;
		
	}
	function queryQua(){
		var outHospitalStartTime=$("#outHospitalStartTime").val();
		var outHospitalEndTime=$("#outHospitalEndTime").val();
		
		if((outHospitalStartTime==null || outHospitalStartTime=="") && (outHospitalEndTime==null || outHospitalEndTime=='') ){
			layer.alert("请输入查询条件!",{icon:7});
			return;
		}
		
		$.ajax({
			type:"post",
			data:{outHospitalStartTime:outHospitalStartTime,outHospitalEndTime:outHospitalEndTime},
			url:"${basePath}/retrieval/getOfficeWork",
			success:function(data){
				if(data.success){
					var html="";
					var objList=data.data;
					for(var i=0;i<objList.length;i++){
						var obj = objList[i];
						html+=" <tr><td class='tdLabel_5' >"+(obj.outDeptName==undefined?'':obj.outDeptName)+"</td>"+
	           				  "	<td class='tdLabel_5' >"+(obj.inHospitalNum==undefined?0:obj.inHospitalNum)+"</td>"+
	                    	  "	<td class='tdLabel_5'> "+(obj.outHospitalNum==undefined?0:obj.outHospitalNum)+"</td>"+
	                    	  "	<td class='tdLabel_5'> "+(obj.criticalNum==undefined?0:obj.criticalNum)+"</td>"+
	                    	  "	<td class='tdLabel_5'>"+(obj.rescueNum==undefined?0:obj.rescueNum)+"</td>"+
	                          " <td class='tdLabel_5'>"+(obj.rescueSuccessNum==undefined?0:obj.rescueSuccessNum)+"</td>"+
	                    	  "	<td class='tdLabel_5'>"+(obj.sickNum==undefined?0:obj.sickNum)+"</td>"+
	                    	  "	<td class='tdLabel_5'>"+(obj.specialNum==undefined?0:obj.specialNum)+"</td></tr>";
					}
					
					$("#tbody").html(html);
				}else{
					layer.alert(data.msg,{icon:2});
				}
			}
		})
		
	}
		
		
		
	 
	
</script>

</body>
</html>